<template>
  <a-tree
    checkable
    v-model="value"
    :auto-expand-parent="true"
    :tree-data="treeData"
    :replace-fields="replaceFields"
  >
  </a-tree>
</template>

<script>
import { QG_QH_TREE_DATA } from '@/mock/tree-data'

const DEFAULT_REPLACE_FIELDS = {
  children:'children', 
  title:'title', 
  key:'key', 
  value: 'value'
}

export default {
  name: 'SaTree',
  props: {
    replaceFields: {
      type: [String, Object],
      default: () => {
        return DEFAULT_REPLACE_FIELDS
      }
    },
  },
  data() {
    return {
      treeData: [...QG_QH_TREE_DATA],
      value: ['110113']
    }
  }
}
</script>

<style lang="scss" scoped>

</style>